package com.cloudptt.api.product.func.call.single;

import java.io.Serializable;

import com.cloudptt.api.product.func.call.CallAttr;
import com.cloudptt.api.product.func.call.CallConst;

public class LaunchCallInfo implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String callKey = null;
	private String callIdStr = null;
	private int callType = CallAttr.CallType_Private;
	private int callDir = CallAttr.CallDir_MO;
	private boolean isDac = false;
	private int callState = -1;
	private int callMediaState = CallConst.CallMediaState_None;
	private boolean hasVideo = false;
	private boolean isEmergency = false;
//	private boolean micEnabled = false;

	public LaunchCallInfo(String callKey, String callIdStr, int callType, int callDir, boolean isDac, int callState, int callMediaState, boolean micEnabled, boolean hasVideo, boolean isEmergency)
	{
		this.callKey = callKey;
		this.callIdStr = callIdStr;
		this.callType = callType;
		this.callDir = callDir;
		this.isDac = isDac;
		this.callState = callState;
		this.callMediaState = callMediaState;
		this.hasVideo = hasVideo;
		this.isEmergency = isEmergency;
//		this.micEnabled = micEnabled;
	}
	
	public String getCallKey() {
		return callKey;
	}

	public int getCallType() {
		return callType;
	}

	public int getCallDir() {
		return callDir;
	}
	public boolean isMoCall() {
		return callDir == CallAttr.CallDir_MO;
	}

	public boolean isDac() {
		return isDac;
	}
	public void setCallState(int callState) {
		this.callState = callState;
	}

	public int getCallState() {
		return callState;
	}
	public void setCallMediaState(int callMediaState) {
		this.callMediaState = callMediaState;
	}
	public int getCallMediaState() {
		return callMediaState;
	}
	public boolean isHasVideo() {
		return hasVideo;
	}
	public boolean isEmergency() {
		return isEmergency;
	}
//	public void setMicEnabled(boolean micEnabled) {
//		this.micEnabled = micEnabled;
//	}
//	
//	public boolean isMicEnabled() {
//		return micEnabled;
//	}
	public String getCallIdStr() {
		return callIdStr;
	}
	
	public String toString() 
	{
		StringBuffer strBuff = new StringBuffer("SingleCallInfo:");
		strBuff.append("callKey = ").append(callKey).append(",");
		strBuff.append("callIdStr = ").append(callIdStr).append(",");
		strBuff.append("callType = ").append(callType).append(",");
		strBuff.append("callDir = ").append(callDir).append(",");
		strBuff.append("isDac = ").append(isDac).append(",");
		strBuff.append("callDir = ").append(callDir).append(",");
		strBuff.append("callState = ").append(callState).append(",");
		strBuff.append("callMediaState = ").append(callMediaState).append(",");
		strBuff.append("hasVideo = ").append(hasVideo).append(".");

		return strBuff.toString();
	}
}
